<template>
	  <ex-dialog v-model="visible" draggable :title="form.roleName"
  width="700" :contentHeight="450">
	  <template #default>
		<el-tabs v-model="activeName"  style="height: 100%">
		  <el-tab-pane label="基本信息" name="base" style="height: 100%">
			<el-descriptions class="margin-top" :column="2" border>
			  <el-descriptions-item label="角色编码">{{form.roleCode}}</el-descriptions-item>
			  <el-descriptions-item label="角色名称">{{form.roleName}}</el-descriptions-item>
			  <el-descriptions-item label="排序">{{form.orderWeight}}</el-descriptions-item>
			  <el-descriptions-item label="描述">{{form.description}}</el-descriptions-item>
			  <el-descriptions-item label="创建时间"><ex-label format code="DATETIME" :value="form.createTime"/></el-descriptions-item>
			  <el-descriptions-item label="创建人"><ex-label code="SysUser" :value="form.createUser"/></el-descriptions-item>
			  <el-descriptions-item label="是否可用"><ex-label code="IS_ENABLED" :value="form.isEnabled"/></el-descriptions-item>
			</el-descriptions>
		  </el-tab-pane>
		  <el-tab-pane label="可用菜单" name="SysMenu" style="height: 100%">
			<ex-rel-table ref="roleRelTable" size="small" :rel-entity="form" :treeApi="this.$API.system.menu.treeData" default-expand-all></ex-rel-table>
		  </el-tab-pane>
<!--		  <el-tab-pane label="可用数据字典" name="SysDic" style="height: 100%">-->
<!--			<ex-rel-table ref="roleRelTable" size="small" :rel-entity="form" :treeApi="this.$API.system.dic.treeData" default-expand-all></ex-rel-table>-->
<!--		  </el-tab-pane>-->
      <el-tab-pane label="管理分类" name="ManageCategory" style="height: 100%">
        <ex-rel-table ref="ManageCategoryRelTable" size="small" name="ManageCategory"  :rel-entity="form" :treeApi="this.$API.asset.assetcategory.treeData" default-expand-all></ex-rel-table>
      </el-tab-pane>
<!--      <el-tab-pane label="查看分类" name="ReadCategory" style="height: 100%">-->
<!--        <ex-rel-table ref="ReadCategoryRelTable" size="small" name="ReadCategory" :rel-entity="form" :treeApi="this.$API.asset.assetcategory.treeData" default-expand-all></ex-rel-table>-->
<!--      </el-tab-pane>-->
<!--		  <el-tab-pane label="可用单据处理方式" name="Sysprocesstype" style="height: 100%">-->
<!--			<ex-rel-table ref="processtypeRelTable" size="small" :rel-entity="form" :treeApi="this.$API.asset.processType.treeData" default-expand-all></ex-rel-table>-->
<!--		  </el-tab-pane>-->
<!--		  <el-tab-pane label="可用资产卡片分组" name="Syscardgroup" style="height: 100%">-->
<!--			<ex-rel-table ref="cardgroupRelTable" size="small" :rel-entity="form" :treeApi="this.$API.asset.processType.treeData" default-expand-all></ex-rel-table>-->
<!--		  </el-tab-pane>-->
		</el-tabs>
	  </template>
	</ex-dialog>
  </template>

  <script>
  import ExRelTable from "@/components/exRelTable/index.vue";
  import ExLabel from "@/components/exLabel/index.vue";
  import exDialog from '@/components/exDialog';

  export default {
	computed: {
	},
	emits: ['success'],
	components: {
		ExLabel,
	  ExRelTable,
	  exDialog
	},
	props: {
	},
	data() {
	  return {
		activeName: 'base',
		visible: false,
		form: {},
	  }
	},
	methods: {
	  //显示
	  open(entity) {
		this.form = Object.assign({}, entity);
		this.visible = true;
		this.activeName = "base";
	  },
	}
  }
  </script>

  <style scoped>
  h2 {
	font-size: 17px;
	color: #3c4a54;
	padding: 0 0 30px 0;
  }

  [data-theme="dark"] h2 {
	color: #fff;
  }

  </style>
